import os
from dotenv import load_dotenv

load_dotenv()

class Config:
    MAAS_API_KEY = os.getenv("MAAS_API_KEY")
    BASE_URL = os.getenv("BASE_URL")
    MODEL = os.getenv("MODEL", "DeepSeek-V3")
    SECRET_KEY = os.getenv("SECRET_KEY", "dev-secret-key")
    
    @classmethod
    def validate(cls):
        if not cls.MAAS_API_KEY or cls.MAAS_API_KEY == "your_actual_api_key_here":
            raise ValueError("请设置正确的 MAAS_API_KEY")
        if not cls.BASE_URL:
            raise ValueError("请设置 BASE_URL")